cssnodedeclaration: Add gtk_css_node_declaration_to_string
authorTimm Bäder <mail@baedert.org>
Tue, 10 Oct 2017 18:59:57 +0000 (20:59 +0200)
committerTimm Bäder <mail@baedert.org>
Tue, 10 Oct 2017 18:59:57 +0000 (20:59 +0200)
gtk/gtkcssnodedeclaration.c
gtk/gtkcssnodedeclarationprivate.h

index 05baa4898f829d6397636b826e035cd956193fe9..10b5458b02ef5022b86249010a1f36ff132f9207 100644 (file)
@@ -478,3 +478,13 @@ gtk_css_node_declaration_print (const GtkCssNodeDeclaration *decl,
         }
     }
 }
+
+char *
+gtk_css_node_declaration_to_string (const GtkCssNodeDeclaration *decl)
+{
+  GString *s = g_string_new (NULL);
+
+  gtk_css_node_declaration_print (decl, s);
+
+  return g_string_free (s, FALSE);
+}
index d927d42a15c39868fdb9a002b43b0531b50fcabd..79c000fcb623de8d528b0b9dfc06895aa2f2cae7 100644 (file)
@@ -62,6 +62,8 @@ void                    gtk_css_node_declaration_add_to_widget_path     (const G
 void                    gtk_css_node_declaration_print                  (const GtkCssNodeDeclaration   *decl,
                                                                          GString                       *string);
 
+char *                  gtk_css_node_declaration_to_string              (const GtkCssNodeDeclaration   *decl);
+
 G_END_DECLS
 
 #endif /* __GTK_CSS_NODE_DECLARATION_PRIVATE_H__ */